    //
//  BaseWebViewController.m
//  Hangxin
//
//  Created by wang fengquan on 6/12/11.
//  Copyright 2011 company. All rights reserved.
//


#import "BaseWebViewController.h"

@implementation BaseWebViewController

- (void)changeWebViewBackground:(UIWebView *)targetWebView
{
	UIView *scrollView = [targetWebView.subviews objectAtIndex:0];
	float red = (float)236/255.0f;
	float green = (float)239/255.0f;
	float blue = (float)243/255.0f;
	scrollView.backgroundColor = [UIColor colorWithRed:red green:green blue:blue alpha:1.0f];
	for (UIView *viewItem in scrollView.subviews)
	{
		if ([viewItem isKindOfClass:[UIImageView class]])
		{
			viewItem.hidden = YES;
		}
	}
}

- (id)init{
	self = [super init];
	if (self){
        CGRect rect=[[UIScreen mainScreen] bounds];
        rect.size.height=rect.size.height-[UIApplication sharedApplication].statusBarFrame.size.height-self.navigationController.navigationBar.frame.size.height-self.tabBarController.tabBar.frame.size.height;
        if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
            self.edgesForExtendedLayout = UIRectEdgeNone;
        }
        
		_innerWebView = [[UIWebView alloc] initWithFrame:rect];
		_innerWebView.delegate = self;
		[self.view addSubview:_innerWebView];		
		[self changeWebViewBackground:_innerWebView];
        [_innerWebView release];
	}
	
	return self;
}
- (void)viewDidLoad {
	[super viewDidLoad];
    self.navigationController.navigationBar.translucent = NO;
	//设置不自动识别电话号码等
	
}

- (void)dealloc {	
    [super dealloc];
}

@end
